<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        
        // 1.初始化变量
        var xhr = new XMLHttpRequest()
        // 2.链接地址
       xhr.open("GET","http://websong.wang:4000/rl?page=1&number=10")
        // 3.发送请求
        xhr.send()
        // 4.检测状态改变
        xhr.onreadystatechange = function () {
            if (xhr.redystate == 4) {
                if (xhr.status >= 200 && xhr.status < 300) {
                    //5. 获取数据
                    var response = JSON.parse(xhr.response)
                    //    console.log(response);
                    var list = response.result.list;
                    console.log(list);
                }
            }
        }
    </script>
</body>

</html>